package cn.iocoder.mall.shop.service.service.rpc.service.impl;

import cn.iocoder.mall.shop.api.RpcShopCategoryService;
import cn.iocoder.mall.shop.service.entities.ShopCategory;
import cn.iocoder.mall.shop.service.service.IShopCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author :ssf
 * @date :2019/11/26
 * 商铺条目远程服务接口实现类
 */
@Service
@org.apache.dubbo.config.annotation.Service(validation = "true", version = "${dubbo.provider.RpcShopCategoryService.version}")
public class RpcShopCategoryServiceImpl implements RpcShopCategoryService {

    @Autowired
    private IShopCategoryService categoryService;

    @Override
    public List<Long> querySpuIdsByCategoryIdAndShopId(String categoryId, String shopId) {
        ShopCategory shopCategory = new ShopCategory();
        shopCategory.setCategoryId(categoryId);
        shopCategory.setShopId(shopId);
        return categoryService.querySpuIdsByCategoryIdAndShopId(shopCategory);
    }
}
